package com.apeli.common.config;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Configuration
@Component
@Data
public class AliyunOssConfig {
    public static String ACCESS_KEY_ID = "LTAI5tK6qAsNdC357w5CHYJV";

    public static String ACCESS_KEY_SECRET = "qOyS78GGvlWBE5D1VITTsyLFx6tk0L";

    public static String ENDPOINT= "http://oss-cn-beijing.aliyuncs.com";

    @Bean
    public OSS getOSS() {
        return new OSSClientBuilder().build(ENDPOINT,ACCESS_KEY_ID,ACCESS_KEY_SECRET);
    }
}
